import { channels } from '@/api/catagtory'
export default {
  namespaced: true,
  state: {
    tabList: [],
    currIndex: 0
  },
  mutations: {
    setTabList (state, value) {
      state.tabList = value
    },
    setCurrIndex (state, value) {
      state.currIndex = value
    }
  },
  actions: {
    // 获取tab列表数据
    async getTabList ({ commit }) {
      const res = await channels()
      commit('setTabList', res.data.data.channels)
      console.log('列表数据', res)
      console.log(3)
    }
  },
  getters: {}
}
